package com.lzw.cpvideoplayer.adapter;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

public class MyPagerAdapter extends FragmentStatePagerAdapter {
    private List<Fragment> mFmList;
    public MyPagerAdapter(@NonNull FragmentManager fm, List<Fragment> fm_list) {
        super(fm);
        mFmList = fm_list;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return mFmList.get(position);
    }

    @Override
    public int getCount() {
        return mFmList.size();
    }
}
